# -*- coding: utf-8 -*-
import scrapy


class BaiduSpider(scrapy.Spider):
    # 1. 爬虫名(必须)
    name = 'baidu'
    # 2. 允许爬虫抓取数据的域名范围
    allowed_domains = ['baidu.com']
    # 3. 启动爬虫后,发送的第一批url地址(这里的请求由引擎构建)
    start_urls = ['https://baidu.com/', 'https://tieba.baidu.com/']

    def parse(self, response):
        print(response.url)
